Intra prediction method and apparatus, and computer-readable storage medium

ABSTRACT

Provided are an intra prediction method and apparatus, and a computer-readable storage medium. The method includes: acquiring a first reference sample set corresponding to the current processing block, wherein the first reference sample set includes at least one of a reference row adjacent to the current processing block and a reference column adjacent to the current processing block; selecting, based on a pre-set selection method, a second reference sample set from the first reference sample set, wherein the second reference sample set includes at least one reference sample in the reference row adjacent to the current processing block or the reference column adjacent to the current processing block; obtaining, based on the second reference sample set, a prediction value of the current processing block; and performing, based on the prediction value, intra prediction on the current processing block.

CROSS-REFERENCE TO RELATED APPLICATION

The present application is a continuation application of U.S.application Ser. No. 17/356,148 filed on Jun. 23, 2021, which is acontinuation application of International PCT Application No.PCT/CN2019/077872, filed on Mar. 12, 2019, the entire content of whichis hereby incorporated by reference.

TECHNICAL FIELD

Implementations of the present disclosure relate to video coding anddecoding technology, relate but are not limited to a method and anapparatus for intra prediction, and a computer readable storage medium.

BACKGROUND

In versatile video coding and decoding, when intra prediction isperformed on a current processing block, an optimal prediction mode(i.e., a prediction mode signalled in a bitstream) of a corresponding orspatial neighboring prediction block (also called a previousreconstructed block) for which intra prediction has been completed, aderivative mode of an optimal direction of the previous reconstructedblock, and a combination of some preset intra prediction modes, areusually used as a candidate prediction mode set of the currentprocessing block, and intra prediction is performed on the currentprocessing block based on multiple candidate prediction modes in theset. Traditional intra prediction modes include DC mode, PLANAR and anangle prediction mode, and the DC mode is further discussed here.

At present, a process of intra prediction of the current processingblock by using the DC mode is that: samples of a neighboring previousrow and a neighboring left column of the current processing block areused as reference samples, and a DC coefficient is obtained throughaveraging the reference sample values of the reference samples, the DCcoefficient is used as a prediction value of the current processingblock to construct the prediction value of the current processing block.

However, since the above DC coefficient is obtained by averagingneighboring reference samples, and the larger the processing block size,the more the number of reference samples which are needed to constructthe DC coefficient, and the higher the complexity of averaging.Therefore, the computational complexity will increase with the increaseof processing block size.

SUMMARY

Implementations of the present disclosure provide a method and anapparatus for intra prediction, and a computer readable storage medium,which can reduce calculation amount and complexity of intra prediction,thereby improving coding and decoding efficiency.

In a first aspect, an implementation of the present disclosure providesa method for intra prediction, including: acquiring a first referencesample set corresponding to a current processing block, wherein thefirst reference sample set includes at least one of a reference row or areference column adjacent to the current processing block; selecting asecond reference sample set from the first reference sample set based ona preset selection mode, wherein the second reference sample setincludes at least one reference sample in the reference row or thereference column adjacent to the current processing block; obtaining aprediction value of the current processing block based on the secondreference sample set; and performing intra prediction on the currentprocessing block based on the prediction value.

In the above solution, the preset selection mode includes at least oneof a preset position, a preset sampling rate or a preset statisticalcharacteristics.

In the above solution, when the preset selection mode is the presetposition, selecting the second reference sample set from the firstreference sample set based on the preset selection mode includes:determining a sub-reference sample at the preset position of eachreference row or each reference column respectively from the firstreference sample set; and determining the sub-reference sample as thesecond reference sample set.

In the above solution, when the preset selection mode is the presetsampling rate, selecting the second reference sample set from the firstreference sample set based on the preset selection mode includes:downsampling the reference row or the reference column in the firstreference sample set according to the preset sampling rate to obtain adown-sampled reference sample; and determining the down-sampledreference sample as the second reference sample set.

In the above solution, when the preset selection mode is the presetstatistical characteristics, selecting the second reference sample setfrom the first reference sample set based on the preset selection modeincludes: selecting the second reference sample set from the referencerow or the reference column in the first reference sample set accordingto the preset statistical characteristics.

In the above solution, when the second reference sample set includes atleast two reference samples, obtaining the prediction value of thecurrent processing block based on the second reference sample setincludes: averaging sample values of the at least two reference samplesto obtain an average value; and setting the prediction value of thecurrent processing block equal to the average value.

In the above solution, when the second reference sample set includes onereference sample, obtaining the prediction value of the currentprocessing block based on the second reference sample set includes:determining a sample value of the reference sample as the predictionvalue of the current processing block.

In the above solution, the preset position is a middle position of thereference row or the reference column.

In the above solution, the preset sampling rate is one half.

In a second aspect, an apparatus for intra prediction is characterizedby including: an acquiring unit, configured to acquire a first referencesample set corresponding to a current processing block, wherein thefirst reference sample set includes at least one of a reference row or areference column adjacent to the current processing block; a determiningunit, configured to select a second reference sample set from the firstreference sample set based on a preset selection mode, wherein thesecond reference sample set includes at least one reference sample inthe reference row or the reference column adjacent to the currentprocessing block; and obtain a prediction value of the currentprocessing block based on the second reference sample set; and apredicting unit, configured to perform intra prediction on the currentprocessing block based on the prediction value.

In the above solution, the preset selection mode includes at least oneof a preset position, a preset sampling rate or a preset statisticalcharacteristics.

In the above solution, when the preset selection mode is the presetposition, the determining unit is specifically configured torespectively determine a sub-reference sample at the preset position ofeach reference row or each reference column respectively from the firstreference sample set; and determine the sub-reference sample as thesecond reference sample set. In the above solution, when the presetselection mode is the preset sampling rate, the determining unit isspecifically configured to downsample the reference row or the referencecolumn in the first reference sample set according to the presetsampling rate to obtain a down-sampled reference sample; and determinethe down-sampled reference sample as the second reference sample set.

In the above solution, when the preset selection mode is the presetstatistical characteristics, the determining unit is specificallyconfigured to select the second reference sample set from the referencerow or the reference column in the first reference sample set accordingto the preset statistical characteristics.

In the above solution, when the second reference sample set includes atleast two reference samples, the determining unit is specificallyconfigured to average sample values of the at least two referencesamples to obtain an average value; and set the prediction value of thecurrent processing block equal to the average value.

In the above solution, when the second reference sample set includes onereference sample, the determining unit is specifically configured todetermine a sample value of the reference sample as the prediction valueof the current processing block.

In the above solution, the preset position is a middle position of thereference row or the reference column.

In the above solution, the preset sampling rate is one half.

In a third aspect, an implementation of the present disclosure providesan apparatus for intra prediction, including: a memory and a processor,wherein the memory stores a computer program which is runnable on theprocessor, and the processor implements the above method for intraprediction when executing the program.

In a fourth aspect, an implementation of the present disclosure providesa computer-readable storage medium, on which a computer program isstored, wherein the computer program, when executed by a processor,implements the above method for intra prediction.

Implementations of the present disclosure provide a method for intraprediction and an apparatus, and a computer readable storage medium. Theapparatus for intra prediction obtains a first reference sample setcorresponding to a current processing block, wherein, the firstreference sample set includes at least one of a reference row or areference column adjacent to the current processing block; selects asecond reference sample set from the first reference sample set based ona preset selection mode, wherein, the second reference sample setincludes at least one reference sample in the reference row or thereference column adjacent to the current processing block; obtains aprediction value of the current processing block based on the secondreference sample set; and performs intra prediction on the currentprocessing block based on the prediction value. According to the abovetechnical implementation solution, since when the apparatus for intraprediction performs intra prediction on the current processing block,part of reference samples are selected from the reference row or thereference column adjacent to the current processing block, and theprediction value of the current processing block is obtained based onthe part of reference samples, the number of reference samples isrelatively small, which reduces calculation amount and complexity ofintra prediction, thereby improving coding and decoding efficiency.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a first schematic diagram of a relationship between a currentprocessing block and a reference sample set in the prior art.

FIG. 2A is a second schematic diagram of a relationship between acurrent processing block and a reference sample set in the prior art.

FIG. 2B is a third schematic diagram of a relationship between a currentprocessing block and a reference sample set in the prior art.

FIG. 3 is a schematic block diagram of composition of a video decodingsystem according to an implementation of the present disclosure.

FIG. 4A is a schematic structure diagram of composition of a videoencoder according to an implementation of the present disclosure.

FIG. 4B is a schematic structure diagram of composition of a videodecoder according to an implementation of the present disclosure.

FIG. 5 is a first flow chart of a method for intra prediction accordingto an implementation of the present disclosure.

FIG. 6 is a second flow chart of a method for intra prediction accordingto an implementation of the present disclosure.

FIG. 7 is a first schematic diagram of an exemplary relationship betweena current processing block and a reference sample set according to animplementation of the present disclosure.

FIG. 8 is a second schematic diagram of an exemplary relationshipbetween a current processing block and a reference sample set accordingto an implementation of the present disclosure.

FIG. 9 is a third schematic diagram of an exemplary relationship betweena current processing block and a reference sample set according to animplementation of the present disclosure.

FIG. 10 is a fourth schematic diagram of an exemplary relationshipbetween a current processing block and a reference sample set accordingto an implementation of the present disclosure.

FIG. 11 is a third flow chart of a method for intra prediction accordingto an implementation of the present disclosure.

FIG. 12 is a fifth schematic diagram of an exemplary relationshipbetween a current processing block and a reference sample set accordingto an implementation of the present disclosure.

FIG. 13 is a sixth schematic diagram of an exemplary relationshipbetween a current processing block and a reference sample set accordingto an implementation of the present disclosure.

FIG. 14 is a fourth flow chart of a method for intra predictionaccording to an implementation of the present disclosure.

FIG. 15 is a first schematic structure diagram of an apparatus for intraprediction according to an implementation of the present disclosure.

FIG. 16 is a second schematic structure diagram of an apparatus forintra prediction according to an implementation of the presentdisclosure.

DETAILED DESCRIPTION

In order to understand features and technical contents ofimplementations of the present disclosure in more detail, implementationmodes of the implementations of the present disclosure will be describedin detail below in conjunction with the accompanying drawings, which arefor reference only and are not intended to limit the implementations ofthe present disclosure.

Firstly, concepts of intra prediction, video coding and decoding, andthe like are introduced below.

A main function of prediction of coding and decoding is to construct aprediction value of a current processing block by using an existingreconstructed picture in space or time in video coding and decoding, andonly transmit a difference between an original value and the predictionvalue, so as to reduce the amount of transmitted data.

A main function of intra prediction is to construct a prediction valueof a current processing block by using the current processing block andsamples in a previous row and samples in a left column adjacent to thecurrent processing block. As shown in FIG. 1 , each sample of a currentprocessing block 101 is predicted by using restored neighboring samplesaround the current processing block 101 (i.e., samples in a previous row102 and samples in a left column 103 adjacent to the current processingblock).

In an implementation of the present disclosure, the intra prediction isperformed for the processing block in a relatively planar region, and DCmode (a square block DC mode as shown in FIG. 2A and a rectangular blockDC mode as shown in FIG. 2B) and PLANAR mode may be adopted. Herein, inthe DC mode, a whole current processing block is filled with an averagevalue of sample values (e.g., chrominance values or luminance values)corresponding to samples in the previous row or the left column, and inthe PLANAR mode, the current processing block is filled in a gradualway.

Herein, a region 1 shown in FIG. 2A is a neighboring reconstructionreference sample.

It should be noted that Versatile Video Coding (VVC) and previous videocoding technologies support various coding unit divisions such asquadtree, binary tree and trigeminal tree, etc., and a processing blockgenerated by such division is a rectangular block. Therefore, whenprediction in the DC mode is performed, if divided into square blocks, aprediction process for the square block is the same as that shown inFIG. 2A, and a reference sample set of the left column (a referencecolumn) and the previous row (a reference row) of the current processingblock is used for prediction. The DC mode of rectangular block is asshown in FIG. 2B. For a rectangular block, a DC coefficient is obtainedby using a reference sample of the long side (i.e. region 2) or areference sample of a short side An advantage of using only thereference sample of the long side is that a division operation whenaveraging sample values may be avoided, and coding and decoding qualityis almost unchanged. For example, assuming that a size of the currentprocessing block is 8×4, considering that the number of referencesamples of the long side is 8, which is the power of 2, averaging may beperformed directly by a displacement operation, thus reducingcomputational complexity.

On the basis of the above concepts, an implementation of the presentdisclosure provides a network architecture of a video coding anddecoding system including a method for intra prediction. FIG. 3 is aschematic structure diagram of composition of a network architecture forvideo coding and decoding according to an implementation of the presentdisclosure. As shown in FIG. 3 , the network architecture includes oneor more electronic devices 11 to 1N and a communication network 01,wherein the electronic devices 11 to 1N may perform video interactionthrough the communication network 01. The electronic devices may bevarious types of devices with video coding and decoding functions inimplementation processes. For example, the electronic devices mayinclude mobile phones, tablet computers, personal computers, personaldigital assistants, navigators, digital phones, video phones,televisions, sensing devices, servers, etc., which is not limited in theimplementations of the present disclosure. Herein, an apparatus forintra prediction in an implementation of the present disclosure may bethe above electronic device.

Herein, the electronic device in an implementation of the presentdisclosure has video coding and decoding functions, and generallyincludes a video encoder and a video decoder.

For example, as shown in FIG. 4A, a structure of composition of a videoencoder 21 includes: a transforming and quantizing unit 211, an intraestimating unit 212, an intra predicting unit 213, a motion compensatingunit 214, a motion estimating unit 215, an inverse transforming andinverse quantizing unit 216, a filter controlling and analyzing unit217, a filtering unit 218, an entropy coding unit 219, a decoded-picturebuffering unit 210, etc. Herein, the filtering unit 218 may performdeblocking filtering and Sample Adaptive Offset (SAO) filtering, and theentropy coding unit 219 may perform header information coding andContext-based Adaptive Binary Arithmatic Coding (CABAC). For an inputsource video data, one block to be coded of a current video frame may beobtained by dividing a Coding Tree Unit (CTU), and then obtainedresidual information is transformed by the transforming and quantizingunit 211 after intra prediction or inter prediction is performed on theblock to be coded, including transforming the residual information froma sample domain to a transform domain, and quantizing an obtainedtransform coefficient to further reduce a bit rate. The intra estimatingunit 212 and the intra predicting unit 213 are used for performing intraprediction on the block to be encoded, for example, determining an intraprediction mode for encoding the block to be encoded. The motioncompensating unit 214 and the motion estimating unit 215 are used forperforming inter prediction encoding of the block to be encoded relativeto one or more blocks in one or more reference frames to provide timeprediction information. Herein, the motion estimating unit 215 is usedfor estimating a motion vector, the motion vector may be used forestimating the motion of the block to be encoded, and then the motioncompensating unit 214 performs motion compensation based on the motionvector. After determining the intra prediction mode, the intrapredicting unit 213 is also used for providing selected intra predictiondata to the entropy coding unit 219, and the motion estimating unit 215also sends the calculated and determined motion vector data to theentropy coding unit 219. In addition, the inverse transforming andinverse quantizing unit 216 is used for reconstructing the block to beencoded, reconstructing a residual block in the sample domain, removingblocking artifacts for the reconstructed residual block through thefilter controlling and analyzing unit 217 and the filtering unit 218,and then adding the reconstructed residual block to one predictive blockin a frame of the decoded-picture buffering unit 210 to generate areconstructed video encoding block. The entropy coding unit 219 is usedfor coding various coding parameters and quantized transformcoefficients, and in a coding algorithm based on CABAC, a contextcontent may be based on neighboring coding blocks, and may be used forcoding information indicating the determined intra prediction mode, andoutputting a bitstream of the video data. And the decoded-picturebuffering unit 210 is used for storing the reconstructed video codingblock for reference in prediction. With the progress of video coding,new reconstructed video coding blocks will be generated continuously,and these reconstructed video coding blocks will be stored in thedecoded-picture buffering unit 210.

A video decoder 22 corresponding to the video encoder 21, a structure ofcomposition of which is as shown in FIG. 4B, includes: an entropydecoding unit 221, an inverse transforming and inverse quantizing unit222, an intra predicting unit 223, a motion compensating unit 224, afiltering unit 225, a decoded-picture buffering unit 226, etc. Hereinthe entropy decoding unit 221 may realize header information decodingand CAB AC decoding, and the filtering unit 225 may realize deblockingfiltering and SAO filtering. After an input video signal is encoded inFIG. 4A, a bitstream of the video signal is output. The bitstream isinput into the video decoder 22, and first passes through the entropydecoding unit 221 to obtain a decoded transform coefficient. Thetransform coefficient is processed by the inverse transforming andinverse quantizing unit 222 to generate a residual block in the sampledomain. The intra predicting unit 223 may be used for generatingprediction data of a current decoded block based on a determined intraprediction mode and data from a current frame or a picture which passesthrough via a decoded block previously. The motion compensating unit 224determines prediction information of the current decoding block byparsing a motion vector and other associated syntax element, and usesthe prediction information to generate a predictive block of the currentdecoding block which is being decoded. A decoded video block is formedby summing the residual block from the inverse transforming and inversequantizing unit 222 with the corresponding predictive block generated bythe intra predicting unit 223 or the motion compensating unit 224. Thedecoded video block passes through the filtering unit 225 so as toremove the blocking artifacts, thereby improving a video quality. Then,the decoded video block is stored in the decoded-picture buffering unit226, the decoded-picture buffering unit 226 stores a reference picturewhich is used for subsequent intra prediction or motion compensation,and is also used for output display of a video signal.

Based on this, the technical solution of the present disclosure will befurther elaborated with reference to the drawings and implementations.The method for intra prediction according to an implementation of thepresent disclosure may be applied to both the video encoder 21 and thevideo decoder 22, which is not specifically limited in an implementationof the present disclosure.

An implementation of the present disclosure provides a method for intraprediction, wherein the method is applied to an apparatus for intraprediction, and a function realized by the method may be realized by aprocessor in the apparatus for intra prediction calling program codes.Of course, the program code may be stored in a computer storage medium.It may be seen that the apparatus for intra prediction at least includesa processor and a storage medium.

FIG. 5 is a schematic flowchart of an implementation process of a methodfor intra prediction according to an implementation of the presentdisclosure. As shown in FIG. 5 , the method includes acts S101 to S104.

In S101, a first reference sample set corresponding to a currentprocessing block is acquired, the first reference sample set includes atleast one of a reference row or a reference column adjacent to thecurrent processing block.

In S102, a second reference sample set is selected from the firstreference sample set based on a preset selection mode, the secondreference sample set includes at least one reference sample in thereference row or the reference column adjacent to the current processingblock.

In S103, a prediction value of the current processing block is obtainedbased on the second reference sample set.

In S104, intra prediction is performed on the current processing blockbased on the prediction value.

In S101, the current processing block in an implementation of thepresent disclosure is a block to be coded or a block to be decoded,wherein the block to be coded is a picture region, on which predictionencoding needs to be performed currently, in a video frame. The block tobe decoded is a picture region, on which decoding needs to be performedat present, in a video frame. The reason why reconstructed samplesoutside the current processing block are called reference samples orreference samples is that when predicting the current processing block,it is necessary to refer to attribute information of these reconstructedsamples (such as luminance component, chrominance component, etc.) topredict samples to be predicted in the current processing block.Therefore, the reconstructed sample is a sample point for whichprediction has been completed.

In an implementation of the present disclosure, when encoding anddecoding the current processing block, the apparatus for intraprediction needs to obtain a first reference sample set corresponding tothe current processing block, and then perform intra prediction based onthe first reference sample set.

For example, for the DC mode, the first reference sample set hereincludes at least one of a reference row or a reference column adjacentto the current processing block. That is to say, in an implementation ofthe present disclosure, the first reference sample set represents threetypes of reference sample, i.e., reference row samples, reference columnsamples, or reference row and reference column samples.

It should be noted that the reference row samples and the referencecolumn samples contain multiple samples. Selection of the firstreference sample set in an implementation of the present disclosure maybe acquired according to the actual regulation and requirement, which isnot limited in an implementation of the present disclosure.

For example, the first reference sample set in FIG. 1 may include allreconstructed samples (reference row samples) in the previous row region102 of the current processing block 101; or, the first reference sampleset includes all reconstructed samples (reference row samples) in theleft column region 103 of the current processing block 101; or, thefirst reference sample set includes all reconstructed samples in theprevious row region 102 of the current processing block 101 and allreconstructed samples in the left column region 103 (i.e., reference rowand reference column samples).

In S102, when performing intra prediction, the apparatus for intraprediction sets a preset selection mode in advance, and the apparatusfor intra prediction may select a reference sample from the firstreference sample set by using the preset selection mode, that is, selectpart of reference samples from the first reference sample set, andrealize intra prediction of the current processing block based on thepart of the reference samples.

Specifically, the apparatus for intra prediction uses a preset selectionmode to select a second reference sample set from the first referencesample set. The second reference sample set includes at least onereference sample in the reference row or the reference column adjacentto the current processing block.

It should be noted that the first reference sample set is at least oneof the reference row or the reference column adjacent to the currentprocessing block. Then, the reference sample selected from the firstreference sample set includes at least one reference sample in thereference row or the reference column adjacent to the current processingblock. That is, the second reference sample set may be at least onereference sample in reference row samples, at least one reference samplein reference column samples, or may be obtained through a combination ofat least one reference sample in reference row samples and at least onereference sample in reference column samples. A specific combinationmode of the second reference sample set may be designed according to anactual situation, which is not limited in an implementation of thepresent disclosure.

In S103 and S104, after obtaining the second reference sample set, theapparatus for intra prediction may obtain the prediction value of thecurrent processing block based on the second reference sample set, andperform intra prediction on the current processing block based on theprediction value.

Herein, the second reference sample set includes a sample identificationof a reconstructed sample, such as a sample number.

In an implementation of the present disclosure, because the quantity ofreference samples in the second reference sample set is indefinite, andmay be one or more (that is, at least two) with respect to the quantityof reference samples, modes of obtaining the prediction value of thecurrent processing block by the apparatus for intra prediction aredifferent, which is as follows.

Mode 1: when the second reference sample set includes at least tworeference samples, the apparatus for intra prediction averages samplevalues of the at least two reference samples to obtain an average value;and the prediction value of the current processing block is set to beequal to the average value.

Mode 2: when the second reference sample set includes one referencesample, the apparatus for intra prediction determines a sample value ofthe reference sample as the prediction value of the current processingblock.

For example, for the DC mode, in an implementation of the presentdisclosure, the apparatus for intra prediction needs to determine thereference sample of the current processing block first, that is, thesecond reference sample set, then deduce a DC coefficient of the currentprocessing block based on the reference sample in the second referencesample set, and obtain the prediction value of the current processingblock based on the DC coefficient.

In an implementation of the present disclosure, when the secondreference sample set includes at least two reference samples, theapparatus for intra prediction averages the sample values of the atleast two reference samples to obtain an average value; and the DCcoefficient of the current processing block is set to be equal to theaverage value, that is, the prediction value of the current processingblock. When the second reference sample set includes one referencesample, the apparatus for intra prediction determines the sample valueof the reference sample as the DC coefficient of the current processingblock, that is, the prediction value of the current processing block.

It may be understood that for a large-area planar processing block, theprediction value of the current processing block is constructed by usingpart of existing reference sample sets, which reduces algorithmcomplexity and computation amount, thus improving coding and decodingefficiency.

In some implementations of the present disclosure, the preset selectionmode includes at least one of a preset position, a preset sampling rateor a preset statistical characteristics, which is not limited in animplementation of the present disclosure.

Based on different preset selection modes, the second reference samplesets on which the method for intra prediction is based are different.

In some implementations of the present disclosure, as shown in FIG. 6 ,when the preset selection mode is the preset position, a process of anintra prediction mode according to an implementation of the presentdisclosure includes acts S201 to S205.

In S201, a first reference sample set corresponding to a currentprocessing block is acquired; wherein the first reference sample setincludes at least one of a reference row or a reference column adjacentto the current processing block.

An implementation process of S201 in an implementation of the presentdisclosure is consistent with the description of the implementationprocess of S101, and will not be repeated here.

In S202, a sub-reference sample at a preset position of each referencerow or each reference column is/are determined respectively from thefirst reference sample set.

In S203, the sub-reference sample is/are determined as the secondreference sample set.

In S202 and S203, based on the description of the implementation processof S102, the apparatus for intra prediction may select a sub-referencesample at a preset position as the second reference sample set withrespect to a reference row or a reference column in the first referencesample set, that is, determine a sub-reference sample at a presetposition of each reference row or each reference column respectivelyfrom the first reference sample set, and determine the sub-referencesample as the second reference sample set.

In an implementation of the present disclosure, when the first referencesample set includes reference row samples, the apparatus for intraprediction acquires a reference sample at a preset position in thereference row samples as a sub-reference sample, and determines thesub-reference sample as a second reference sample set. When the firstreference sample set includes reference column samples, the apparatusfor intra prediction acquires a reference sample at a preset position inthe reference column samples as a sub-reference sample, and determinesthe sub-reference sample as a second reference sample set. When thefirst reference sample set includes reference row and reference columnsamples, the apparatus for intra prediction acquires a first referencesample at a preset position in reference column samples and a secondreference sample at a preset position in reference row samples, combinesthe first reference sample and the second reference sample assub-reference samples, and determines the sub-reference samples as asecond reference sample set.

In an implementation of the present disclosure, the preset position is amiddle position of a reference row or a reference column, or the presetpositions may also be multiple positions on both sides of the referencerow or the reference column, etc., which is not limited in animplementation of the present disclosure.

For example, the DC mode is taken as an example for explanation. Theapparatus for intra prediction selects two sub-reference samples from anexisting first reference sample set based on the preset position, and anaverage value of the two sub-reference samples is used as a DCcoefficient. Assuming that the preset position is the middle position ofthe reference row or the reference column, when the current processingblock is a square, part of samples in a left column sample set and aprevious row sample set of a center position of the current processingblock are selected as part of reference samples. Assuming that a size ofthe current processing block is N×N, the samples at the N/2 position (aposition index starts from 0) in the sample set in the left column andat the N/2 position (a position index starts from 0) in the sample setin the previous row are respectively selected as sub-reference samples.For example, in FIG. 7 , the size of the current block is 8×8, andsamples represented by lines are an existing reference sample set, thatis, the first reference sample set. At this time, a sample at a positionwith an index number 4 in the sample set in the left column and theprevious row is selected as the sub-reference sample, that is, thesecond reference sample set, for constructing the DC coefficient. Whenthe current processing block is a rectangle, a reference sample at aposition of ½ of a long side in the rectangle is selected as thesub-reference sample. Assuming that the size of the current block is N×M(N>M), a sample at a position of N/2 of a side with a length N isselected as the sub-reference sample. For example, in FIG. 8 , the sizeof the current processing block is 8×4, and samples represented by linesare an existing reference sample set, that is, the first referencesample set. At this time, a sample at a position with an index number 4in the sample set in the previous row is selected as the sub-referencesample, that is, the second reference sample set, for constructing theDC coefficient.

It may be understood that computational complexity of DC coefficientderivation may be greatly reduced by using the intra predicting mode inthe present disclosure, and computation amount for square blocks isreduced by ½, and computation amount for rectangular blocks is reducedby ¾. With VTM4.0 as a benchmark, coding time and decoding time can bereduced with the coding rate unchanged under a premise of a samerecovered video quality.

It should be noted that, for a video picture, a video frame may bedivided into squares or rectangles, etc. At this time, for a situationthat there are both reference row samples and a reference column samplesin the first reference sample set, the preset position may be differentpositions or the same position for the reference row samples and thereference column samples, which is not limited in an implementation ofthe present disclosure.

In an implementation of the present disclosure, for the currentprocessing block, no matter it is a square block or a rectangular block,a combination of sub-reference samples at preset positions in the samplesets of the left column and the previous row is uniformly selected as asecond reference sample set for constructing the DC coefficient. Or, forthe current processing block, no matter it is a square block or arectangular block, only a first sub-reference sample at the presetposition in the sample set of the left column or a second sub-referencesample at the preset position in the sample set of the previous row isuniformly used, and the first sub-reference sample or the secondsub-reference sample is used as the second reference sample set forconstructing the DC coefficient.

For example, as shown in FIGS. 9 and 10 , a combination of sub-referencesamples at preset positions in the sample sets of the left column andthe previous row is uniformly selected as the second reference sampleset. For a square block (FIG. 9 ) and a rectangular block (FIG. 10),reference samples A and B of the left column and the previous column ofa center position are uniformly selected as the second reference sampleset for constructing the DC coefficient.

For example, only a first sub-reference sample at the preset position inthe sample set of the left column or a second sub-reference sample atthe preset position in the sample set of the previous row is uniformlyused, and the first sub-reference sample or the second sub-referencesample is used as the second reference sample set for constructing theDC coefficient, as described below, (1) for a rectangular block, asub-reference sample at a position of ½ of a long side is selected asthe second reference sample set; and for a square block, a combinationof a sub-reference sample at a position of ½ in a previous row and aleft column is selected as the second reference sample set. (2) For arectangular block, a sub-reference sample at a position of ½ of a shortside is selected as the second reference sample set, and for a squareblock, a combination of a sub-reference sample at a position of ½ of aprevious row and a left column is selected as the second referencesample set. That is to say, for a rectangular block, a sub-referencesample at a preset position on one side may be selected as the secondreference sample set, which is not limited in an implementation of thepresent disclosure.

In S204, based on the second reference sample set, a prediction value ofa current processing block is obtained.

An implementation process of S204 in an implementation of the presentdisclosure is consistent with the description of the implementationprocess of S103, and will not be repeated here.

In S205, based on the prediction value, intra prediction is performed onthe current processing block.

An implementation process of S205 in an implementation of the presentdisclosure is consistent with the description of the implementationprocess of S104, and will not be repeated here.

It may be understood that for a large-area planar processing block, theprediction value of the current processing block is constructed by usingpart of existing reference sample sets, which reduces algorithmcomplexity and computation amount, thus improving coding and decodingefficiency.

In some implementations of the present disclosure, as shown in FIG. 11 ,when the preset selection mode is the preset sampling rate, a process ofan intra prediction mode according to an implementation of the presentdisclosure includes acts S301 to S305.

In S301, a first reference sample set corresponding to a currentprocessing block is acquired; wherein the first reference sample setincludes at least one of a reference row or a reference column adjacentto the current processing block.

An implementation process of S301 in an implementation of the presentdisclosure is consistent with the description of the implementationprocess of S101, and will not be repeated here.

In S302, the reference row or the reference column in the firstreference sample set is downsampled according to the preset samplingrate to obtain a down-sampled reference sample.

In S303, the down-sampled reference sample is/are determined as thesecond reference sample set.

In S302 and S303, based on the description of the implementation ofS102, the apparatus for intra prediction may downsample the referencerow or the reference column in the first reference sample set accordingto the preset sampling rate to obtain the down-sampled reference sample,wherein the down-sampled reference sample is/are used as the secondreference sample set.

In an implementation of the present disclosure, the preset sampling ratemay be one-half or other sampling values, such as three-quarters,two-fifths, which is not limited in an implementation of the presentdisclosure.

For example, a current first reference sample set is down-sampled by ½,and a DC coefficient is constructed by using the down-sampled referencesample. For a square block, as shown in FIG. 12 , lines represent adown-sampled reference sample C. As shown in FIG. 13 , lines represent adown-sampled reference sample D.

It should be noted that the preset sampling rate may be understood as amode of selecting the preset position, so the principle of acquiring thesecond reference sample set by the apparatus for intra predictionaccording to the preset sampling rate is the same as the principle ofacquiring the second reference sample set according to the presetposition, which is not limited in an implementation of the presentdisclosure.

In S304, based on the second reference sample set, a prediction value ofa current processing block is obtained.

An implementation process of S304 in an implementation of the presentdisclosure is consistent with the description of the implementationprocess of S103, and will not be repeated here.

In S305, based on the prediction value, intra prediction is performed onthe current processing block.

An implementation process of S305 in an implementation of the presentdisclosure is consistent with the description of the implementationprocess of S104, and will not be repeated here.

It may be understood that for a large-area planar processing block, theprediction value of the current processing block is constructed by usingpart of existing reference sample sets, which reduces algorithmcomplexity and computation amount, thus improving coding and decodingefficiency.

In some implementations of the present disclosure, as shown in FIG. 14 ,when the preset selection mode is the preset statisticalcharacteristics, a process of an intra prediction mode according to animplementation of the present disclosure includes acts S401 to S404.

In S401, a first reference sample set corresponding to a currentprocessing block is acquired; wherein the first reference sample setincludes at least one of a reference row or a reference column adjacentto the current processing block.

An implementation process of S401 in an implementation of the presentdisclosure is consistent with the description of the implementationprocess of S101, and will not be repeated here.

In S402, a second reference sample set is selected from the referencerow or the reference column in the first reference sample set accordingto the preset statistical characteristics.

In an implementation of the present disclosure, the apparatus for intraprediction may select, according to the preset statisticalcharacteristics, the second reference sample set that meets thestatistical characteristics from the reference row or the referencecolumn in the first reference sample set.

In an implementation of the present disclosure, the preset statisticalcharacteristics represents a sample point, which best represents theneighboring reference sample, in the reference row or the referencecolumn.

It should be noted that the preset statistical characteristics may beunderstood as a mode of selecting the preset position, so the principleof acquiring the second reference sample set by the apparatus for intraprediction according to the preset statistical characteristics is thesame as the principle of acquiring the second reference sample setaccording to the preset position, which is not limited in animplementation of the present disclosure.

In S403, based on the second reference sample set, a prediction value ofthe current processing block is obtained.

An implementation process of S403 in an implementation of the presentdisclosure is consistent with the description of the implementationprocess of S103, and will not be repeated here.

In S404, based on the prediction value, intra prediction is performed onthe current processing block.

An implementation process of S404 in an implementation of the presentdisclosure is consistent with the description of the implementationprocess of S104, and will not be repeated here.

It may be understood that for a large-area planar processing block, theprediction value of the current processing block is constructed by usingpart of existing reference sample sets, which reduces algorithmcomplexity and computation amount, thus improving coding and decodingefficiency.

Based on the foregoing implementation, an implementation of the presentdisclosure provides an apparatus for intra prediction, various unitsincluded in the apparatus and various modules included in the variousunits may be realized by a processor in the apparatus for intraprediction. Of course, it may also be realized by a specific logiccircuit. In an implementation process, the processor may be a CentralProcessing Unit (CPU), a microprocessor (MPU), a Digital SignalProcessor (DSP) or a Field Programmable Gate Array (FPGA), etc.

As shown in FIG. 15 , an implementation of the present disclosureprovides an apparatus for intra prediction 3, which includes: anacquiring unit 30, configured to acquire a first reference sample setcorresponding to a current processing block, wherein the first referencesample set includes at least one of a reference row or a referencecolumn adjacent to the current processing block; a determining unit 31,configured to select a second reference sample set from the firstreference sample set based on a preset selection mode, wherein thesecond reference sample set includes at least one reference sample inthe reference row or the reference column adjacent to the currentprocessing block; and obtain a prediction value of the currentprocessing block based on the second reference sample set; and apredicting unit 32, configured to perform intra prediction on thecurrent processing block based on the prediction value.

In some implementations of the present disclosure, the preset selectionmode includes at least one of a preset position, a preset sampling rateor a preset statistical characteristics.

In some implementations of the present disclosure, when the presetselection mode is the preset position, the determining unit 31 isspecifically configured to determine a sub-reference sample at thepreset position of each reference row or each reference columnrespectively from the first reference sample set; and determine thesub-reference sample as the second reference sample set.

In some implementations of the present disclosure, when the presetselection mode is the preset sampling rate, the determining unit 31 isspecifically configured to downsample the reference row or the referencecolumn in the first reference sample set according to the presetsampling rate to obtain a down-sampled reference sample; and determinethe down-sampled reference sample as the second reference sample set.

In some implementations of the present disclosure, when the presetselection mode is the preset statistical characteristics, thedetermining unit 31 is specifically configured to select the secondreference sample set from the reference row or the reference column inthe first reference sample set according to the preset statisticalcharacteristics.

In some implementations of the present disclosure, when the secondreference sample set includes at least two reference samples, thedetermining unit 31 is specifically configured to average sample valuesof the at least two reference samples to obtain an average value; andset the prediction value of the current processing block equal to theaverage value.

In some implementations of the present disclosure, when the secondreference sample set includes one reference sample, the determining unit31 is specifically configured to determine a sample value of thereference sample as the prediction value of the current processingblock.

In some implementations of the present disclosure, the preset positionis a middle position of the reference row or the reference column.

In some implementations of the present disclosure, the preset samplingrate is one half.

The description of the above apparatus implementation is similar to thedescription of the above method implementation, and has similarbeneficial effects as the method implementation. For technical detailsnot disclosed in the apparatus implementation of the present disclosure,please refer to the description of the method implementation of thepresent disclosure to understand.

It should be noted that in the implementations of the presentdisclosure, if the above method for intra prediction is implemented inthe form of a software function module and when sold or used as anindependent product, it may also be stored in a computer readablestorage medium. Based on this understanding, the technical solutions ofthe implementations of the present disclosure, in essence, or the partcontributing to the related art, may be embodied in the form of asoftware product, the computer software product is stored in one storagemedium and includes several instructions to make an electronic device(which may be a mobile phone, a tablet, a personal computer, a personaldigital assistant, a navigator, a digital telephone, a video telephone,a television, a sensing device, a server, etc.) perform all or part ofthe method described in various implementations of the presentdisclosure. And the aforementioned storage medium includes various mediawhich may store program codes, such as a U disk, a mobile hard disk, aRead Only Memory (ROM), a magnetic disk or an optical disk. Thus, theimplementations of the present disclosure are not limited to anyspecific combination of hardware and software.

In practical application, as shown in FIG. 16 , an implementation of thepresent disclosure provides an apparatus for intra prediction, whichincludes: a memory 33 and a processor 34, wherein the memory 33 stores acomputer program that is runnable on the processor 34, and when theprocessor 34 executes the program, the acts in the method for intraprediction provided in the above implementation are realized.

Accordingly, an implementation of the present disclosure provides acomputer readable storage medium on which a computer program is stored,wherein when the computer program is executed by a processor, the actsin the method for intra prediction provided in the above implementationare realized.

It should be pointed out here that the descriptions of the above storagemedium and the apparatus implementation are similar to the descriptionof the above method implementation, and they have similar beneficialeffects as the method implementation. For technical details notdisclosed in the storage medium and the apparatus implementation of thepresent disclosure, please refer to the description of the methodimplementation of the present disclosure to understand.

What are described above are merely implementations of the presentdisclosure, but the protection scope of the present disclosure is notlimited thereto. Any variation or substitution that may easily occur toa person skilled in the art within the technical scope disclosed by thepresent disclosure shall be included within the protection scope of thepresent disclosure. Therefore, the protection scope of the presentdisclosure shall be determined by the protection scope of the claims.

INDUSTRIAL APPLICABILITY

In implementations of the present disclosure, when an apparatus forintra prediction performs intra prediction on a current processingblock, it selects part of reference samples from a reference row or areference column adjacent to the current processing block, and obtains aprediction value of the current processing block based on the part ofreference samples, the number of reference samples is relatively small,which reduces calculation amount and complexity of intra prediction,thereby improving coding and decoding efficiency.

The invention claimed is:
 1. A video decoding method, comprising:acquiring a first reference sample set corresponding to a currentprocessing block; selecting a second reference sample set from the firstreference sample set based on a preset sampling rate, wherein selectingthe second reference sample set from the first reference sample setbased on a preset sampling rate comprises: downsampling a reference rowor a reference column in the reference samples in the first referencesample set according to the preset sampling rate to acquire adown-sampled reference sample, wherein the reference row or thereference column is adjacent to the current processing block; anddetermining the down-sampled reference sample as the second referencesample set; and acquiring a prediction value of the current processingblock based on the second reference sample set, wherein when the secondreference sample set comprises at least two reference samples, acquiringthe prediction value of the current processing block based on the secondreference sample set comprises: averaging sample values of the at leasttwo reference samples to acquire an average value; and setting theprediction value of the current processing block equal to the averagevalue.
 2. The method of claim 1, wherein selecting a second referencesample set from the first reference sample set based on a presetsampling rate comprises: determining a sub-reference sample at a presetposition of the reference samples from the first reference sample set;and determining the sub-reference sample as the second reference sampleset.
 3. The method of claim 1, wherein selecting a second referencesample set from the first reference sample set based on a presetsampling rate comprises: selecting the second reference sample set fromthe reference samples in the first reference sample set according to apreset statistical characteristics.
 4. The method of claim 1, whereinwhen the second reference sample set comprises one reference sample,acquiring the prediction value of the current processing block based onthe second reference sample set comprises: determining a sample value ofthe reference sample as the prediction value of the current processingblock.
 5. The method of claim 2, wherein, the preset position is amiddle position of the reference samples.
 6. The method of claim 1,wherein, the first reference sample set comprises at least one of areference row or a reference column adjacent to the current processingblock, and the preset sampling rate is one half.
 7. A video decodingapparatus, comprising: a memory and a processor, wherein the memorystores a computer program which is runnable on the processor, and whenthe program is executed, the processor is configured to acquire a firstreference sample set corresponding to a current processing block; selecta second reference sample set from the first reference sample set basedon a preset sampling rate, wherein selecting the second reference sampleset from the first reference sample set based on a preset sampling ratecomprises: downsampling a reference row or a reference column in thereference samples in the first reference sample set according to thepreset sampling rate to acquire a down-sampled reference sample, whereinthe reference row or the reference column is adjacent to the currentprocessing block; and determining the down-sampled reference sample asthe second reference sample set; and acquire a prediction value of thecurrent processing block based on the second reference sample set,wherein when the second reference sample set comprises at least tworeference samples, the processor is configured to average sample valuesof the at least two reference samples to acquire an average value; andset the prediction value of the current processing block equal to theaverage value.
 8. The apparatus of claim 7, wherein the processor isfurther configured to determine a sub-reference sample at a presetposition of the reference samples from the first reference sample set;and determine the sub-reference sample as the second reference sampleset.
 9. The apparatus of claim 7, wherein the processor is furtherconfigured to select the second reference sample set from the referencesamples in the first reference sample set according to a presetstatistical characteristics.
 10. The apparatus of claim 7, wherein whenthe second reference sample set comprises one reference sample, theprocessor is configured to determine a sample value of the referencesample as the prediction value of the current processing block.
 11. Theapparatus of claim 8, wherein the preset position is a middle positionof the reference samples.
 12. The apparatus of claim 7, wherein thefirst reference sample set comprises at least one of a reference row ora reference column adjacent to the current processing block, and thepreset sampling rate is one half.
 13. A video encoding apparatus,comprising: a memory and a processor, wherein the memory stores acomputer program which is runnable on the processor, and when theprogram is executed, the processor is configured to acquire a firstreference sample set corresponding to a current processing block; selecta second reference sample set from the first reference sample set basedon a preset sampling rate, wherein selecting the second reference sampleset from the first reference sample set based on a preset sampling ratecomprises: downsampling a reference row or a reference column in thereference samples in the first reference sample set according to thepreset sampling rate to acquire a down-sampled reference sample, whereinthe reference row or the reference column is adjacent to the currentprocessing block; and determining the down-sampled reference sample asthe second reference sample set; and acquire a prediction value of thecurrent processing block based on the second reference sample set,wherein when the second reference sample set comprises at least tworeference samples, the processor is configured to average sample valuesof the at least two reference samples to acquire an average value; andset the prediction value of the current processing block equal to theaverage value.
 14. The apparatus of claim 13, wherein the processor isfurther configured to determine a sub-reference sample at a presetposition of the reference samples from the first reference sample set;and determine the sub-reference sample as the second reference sampleset.
 15. The apparatus of claim 13, wherein the processor is furtherconfigured to select the second reference sample set from the referencesamples in the first reference sample set according to a presetstatistical characteristics.
 16. The apparatus of claim 13, wherein whenthe second reference sample set comprises one reference sample, theprocessor is configured to determine a sample value of the referencesample as the prediction value of the current processing block.
 17. Theapparatus of claim 14, wherein the preset position is a middle positionof the reference samples.